package com.sh.business.domain.bo;

import com.sh.business.domain.UserRepurchase;
import com.sh.common.mybatis.core.domain.BaseEntity;
import com.sh.common.core.validate.AddGroup;
import com.sh.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 用户充值复购u记录业务对象 bms_user_repurchase
 *
 * @author ruoyi
 * @date 2025-04-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = UserRepurchase.class, reverseConvertGenerate = false)
public class UserRepurchaseBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 用户id
     */
    //@NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 订单编号
     */
    //@NotBlank(message = "订单编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderSn;

    /**
     * 充值数量
     */
    //@NotNull(message = "充值数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal purchaseAmount;

    /**
     * 充值金额
     */
    @NotNull(message = "充值金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amount;

    /**
     * hash
     */
    @NotBlank(message = "hash不能为空", groups = { AddGroup.class, EditGroup.class })
    private String txHash;

    /**
     * 状态（0：错误数据 1：待确认 2: 确认到账）
     */
    @NotNull(message = "状态（0：错误数据 1：待确认 2: 确认到账）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    /**
     * 时间
     */
    @NotNull(message = "时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date transferTime;

    /**
     * 充值地址
     */
    @NotBlank(message = "充值地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fromAddress;

    /**
     * 收款地址
     */
    @NotBlank(message = "收款地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String toAddress;

    /**
     * 链上数据
     */
    @NotBlank(message = "链上数据不能为空", groups = { AddGroup.class, EditGroup.class })
    private String notifyData;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
